<template>
  <div>

    <!--***页面-->
    <el-row :gutter="0">
      <el-col :span="2" :offset="22" style="height:40px;line-height:40px;">
        <el-button type="success" @click="add">保存</el-button>
      </el-col>
    </el-row>

    <el-row>
      <el-col :span="24" :offset="0" style="margin-top:20px;border: 1px solid red">

        <!--:inline="true"表示每个input框不会占满一行-->
        <el-form :label-position="labelPosition" :inline="true" :model="form" >
          <el-form-item align="left" class="width270Height40" style="" label="员工编号">
            <el-input v-model="form.id" placeholder="员工编号"></el-input>
          </el-form-item>
          <el-form-item align="left" class="width270Height40" style="" label="员工姓名">
            <el-input v-model="form.name" placeholder="员工姓名"></el-input>
          </el-form-item>
          <el-form-item align="left" class="width270Height40" style="" label="患者年龄">
            <el-input v-model="form.price" placeholder="患者年龄"></el-input>
          </el-form-item>
          <el-form-item align="left" class="width270Height40" style="" label="性别">
            <el-input v-model="form.price1" placeholder="性别"></el-input>
          </el-form-item>
          <el-form-item align="left" class="width270Height40" style="" label="手机号码">
            <el-input v-model="form.danwei" placeholder="手机号码"></el-input>
          </el-form-item>
          <el-form-item align="left" class="width270Height40" style="" label="电子邮箱">
            <el-input v-model="form.fenlei" placeholder="电子邮箱"></el-input>
          </el-form-item>
          <el-form-item align="left" class="width270Height40" style="" label="证件号码">
            <el-input v-model="form.leixing" placeholder="证件号码"></el-input>
          </el-form-item>
        </el-form>

      </el-col>
    </el-row>


    <el-row>
      <el-col :span="24" :offset="0" style="margin-top:20px;border: 1px solid red">

        <el-table :data="tableData" :header-cell-style="{lineHeight:'20px'}"
          stripe style="width: 100%">
          <el-table-column prop="date" label="序号" width="180"> </el-table-column>
          <el-table-column prop="name" label="药品编码" width="180"> </el-table-column>
          <el-table-column prop="address" label="药品名称"> </el-table-column>
          <el-table-column prop="address" label="药品规格"> </el-table-column>
          <el-table-column prop="address" label="数量"> </el-table-column>
          <el-table-column prop="address" label="单位"> </el-table-column>
          <el-table-column prop="address" label="单价"> </el-table-column>
          <el-table-column prop="address" label="总价"> </el-table-column>
          <el-table-column prop="address" label="编辑"> </el-table-column>
        </el-table>

      </el-col>
    </el-row>

  </div>
</template>

<script>
  export default {
    name: "demo1",
    data() {
      const item = {
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      };
      return {
        labelPosition: 'top',
        form: {
        },
        tableData: Array(3).fill(item),
      }
    },
    methods: {
      onSubmit() {
        alert("保存成功")
        console.log('submit!');
      },
      back:function () {
        this.$router.push("/patient")
      }
    }
  }
</script>

<style scoped>
  .width270Height40{
    width: 270px;line-height:40px;float:left;margin-right:40px;
  }
</style>
